<?php
namespace app\warehouse\model;

use think\Model;
use think\Db;
class Allocation extends Model
{
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    // protected $updateTime = 'updatetime';
    // 自动写入时间戳
    protected $autoWriteTimestamp = true;

    public function getAShopNameAttr($value)
    {
    	$name = Db::name('shop')->where('id',$value)->value('name');
    	return $name;
    }
    public function getBShopNameAttr($value)
    {
    	$name = Db::name('shop')->where('id',$value)->value('name');
    	return $name;
    }
    public function getAWarehouseNameAttr($value)
    {
    	$name = Db::name('warehouse')->where('id',$value)->value('name');
    	return $name;
    }
    public function getBWarehouseNameAttr($value)
    {
    	$name = Db::name('warehouse')->where('id',$value)->value('name');
    	return $name;
    }


}
